package com.lagou.edu;

import com.lagou.edu.consumer.RpcConsumer;
import com.lagou.edu.pojo.User;
import com.lagou.edu.service.UserService;

/**
 * @author 赵虎
 * @date 2020/11/25 13:53
 */
public class ClientBootstrap {


    public static void main(String[] args) throws InterruptedException {
        RpcConsumer rpcConsumer = new RpcConsumer();
        UserService userService = (UserService) rpcConsumer.createProxy(UserService.class);
        for (;;){
            Thread.sleep(1000);
            User user = new User();
            user.setUsername("zhangsan");
            user.setAge(18);
            System.out.println(userService.sayHello(user));

            System.out.println(userService.getUserList(17));
        }
    }
}
